package jdos.gui;

import java.awt.event.KeyEvent;

public class KeyboardKey {
    static public boolean isLeft(Object key) {
        return ((KeyEvent)key).getKeyLocation()==KeyEvent.KEY_LOCATION_LEFT;
    }

    static public boolean isRight(Object key) {
        return ((KeyEvent)key).getKeyLocation()==KeyEvent.KEY_LOCATION_RIGHT;
    }

    static public boolean isNumPad(Object key) {
        return ((KeyEvent)key).getKeyLocation()==KeyEvent.KEY_LOCATION_NUMPAD;
    }

    static public boolean isPressed(Object key) {
        return ((KeyEvent)key).getID()==KeyEvent.KEY_PRESSED;
    }

    static public boolean isReleased(Object key) {
        return ((KeyEvent)key).getID()==KeyEvent.KEY_RELEASED;
    }

    static public int getKeyCode(Object key) {
        return ((KeyEvent)key).getKeyCode();
    }

    static boolean ctrAltDel=false;

}
